package com.kai.state;

/**
 * @Author Mr.Yan
 * @create 2022/3/24 12:02
 * @description:
 */
public class Context {
    public static final OpeningState OPENING_STATE =new OpeningState();
    public static final ClosingState CLOSING_STATE =new ClosingState();
    public static final RunningState RUNNING_STATE =new RunningState();
    public static final StoppingState STOPPING_STATE =new StoppingState();

    public LiftState liftState;

    public LiftState getLiftState() {
        return liftState;
    }

    public void setLiftState(LiftState liftState) {
        this.liftState = liftState;
        this.liftState.context=this;
    }

    public void open(){
        liftState.open();
    }

    public void close(){
        liftState.close();
    }

    public void run(){
        liftState.run();
    }
    public void stop(){
        liftState.stop();
    }
}
